#{extends 'main.html' /} #{set title:'Home' /}

<!-- @author Ayatullah marawan
this page retrieve the list of members that the Registered User put in his private List for privacy settings
with button remove next to each member where this button remove him from the list -->

<body style="background-color: white;">
	<h1>
		<font size="3" face="New times roman" color="red"> <i>
				Members in your Private List : </i> </font>
	</h1>

	#{ifnot privateList}
	<p>There are no members !!</p>
	#{/ifnot}
	<script type="text/javascript">
		function show_alert() {
			alert("You Have Successfully Removed The Member !");
		}
	</script>
	#{if !privateList.empty}	
	<table width="300" id="dataTable" background="lightblue" ; border="2"
		; BORDERCOLOR=#FF6600>
		<tr>
			<th
				style="background-color: #778899; font-family: Arial; font-size: 20px"><p
					style="color: white;">Members</p></th>
			<th
				style="background-color: #778899; font-family: Arial; font-size: 20px"><p
					style="color: white;">Action</p></th> #{list items:privateList,as:'RegisteredUser'}
		</tr>
		<td>
			<div id="${RegisteredUser.id}">
				<ul>
					<li>
						<h4>${RegisteredUser.name}</h4>
					</li>
				</ul>
				<ul>
					<h4>${RegisteredUser.mail}</h4>
				</ul>
			</div>
		</td>
		<td>
			<form action="@{Application.removeFromList()}" method="GET">
				<div id="${RegisteredUser.id}">
					<input style="visibility: hidden;" type="text" name="x"
						value="false" /><br>
					<button name="remove" type="submit" onclick="show_alert()"
						value="${RegisteredUser.id}">Remove</button>
				</div>
				<hr>
			</form>
		</td> #{/list}
	</table>
		#{/if}
	<a href="@{registeredusers.setprivacy()}">Back to Privacy Settings</a>
	<a href="@{Application.viewprofile()}">Back to Profile Page</a>
</body>
